#ifndef __HWICODEC_COMMON_H__
#define __HWICODEC_COMMON_H__

#include <hwicodec.h>
#include <hwicodec_pf.h>
#include <hwicodec_soc.h>
#include <hwicodec_h264.h>
#include <hwicodec_jpeg.h>
#include <hwicodec_reqid.h>
#include <hwicodec_h265.h>
struct hwicodec {
	hwicodec_param_t	param;
	hwicodec_func_t		pf;
	hwicodec_soc_t		soc;
	watermark_t			*wmhandler;
	void				*p;
};

typedef struct hwicodec_mmcut {
	int		type;
	int		size;
	int		ysize;
} hwicodec_mmcut_t;

extern void hwicodec_log(hwicodec_t *h, int i_level, const char *psz_fmt, ...);
extern int hwicodec_cal_bufsize(hwicodec_t *h, hwicodec_soc_binfo_t *pbinfo, int width, int height);
extern int hwicodec_init_soc_bpool(hwicodec_t *h, hwicodec_soc_binfo_t *pbinfo, hwicodec_mmcut_t *pcut,
		int width, int height, int tlb_needed);

extern int private_tlb_open(hwicodec_t *h, int ch, unsigned int tlb_vbase, unsigned int tlb_pbase);
extern int private_tlb_close(hwicodec_t *h, int ch);
extern int private_tlb_map(unsigned int v_addr, unsigned int p_addr, int length, int pad);

#endif /* __HWICODEC_COMMON_H__ */
